.class public Ldata/GoodsData;
.super Landroid/widget/BaseAdapter;
.source "GoodsData.java"


# instance fields
.field c:Landroid/content/Context;

.field lf:Landroid/view/LayoutInflater;

.field ls:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lbean/GoodsBean;",
            ">;"
        }
    .end annotation
.end field

.field selectid:I


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/List;)V
    .locals 0
    .param p1, "context"    # Landroid/content/Context;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/List",
            "<",
            "Lbean/GoodsBean;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 44
    .local p2, "list":Ljava/util/List;, "Ljava/util/List<Lbean/GoodsBean;>;"
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 46
    iput-object p1, p0, Ldata/GoodsData;->c:Landroid/content/Context;

    .line 47
    iput-object p2, p0, Ldata/GoodsData;->ls:Ljava/util/List;

    .line 50
    return-void
.end method


# virtual methods
.method public Getselectid()I
    .locals 1

    .prologue
    .line 73
    iget v0, p0, Ldata/GoodsData;->selectid:I

    return v0
.end method

.method public getCount()I
    .locals 1

    .prologue
    .line 55
    iget-object v0, p0, Ldata/GoodsData;->ls:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1
    .param p1, "position"    # I

    .prologue
    .line 61
    const/4 v0, 0x0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2
    .param p1, "position"    # I

    .prologue
    .line 67
    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 25
    .param p1, "position"    # I
    .param p2, "convertView"    # Landroid/view/View;
    .param p3, "parent"    # Landroid/view/ViewGroup;

    .prologue
    .line 80
    move-object/from16 v0, p0

    iget-object v0, v0, Ldata/GoodsData;->c:Landroid/content/Context;

    move-object/from16 v22, v0

    invoke-static/range {v22 .. v22}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v22

    const v23, 0x7f030067

    const/16 v24, 0x0

    invoke-virtual/range {v22 .. v24}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 81
    move-object/from16 v0, p0

    iget-object v0, v0, Ldata/GoodsData;->ls:Ljava/util/List;

    move-object/from16 v22, v0

    move-object/from16 v0, v22

    move/from16 v1, p1

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lbean/GoodsBean;

    .line 82
    .local v4, "bb":Lbean/GoodsBean;
    invoke-virtual {v4}, Lbean/GoodsBean;->gettypeid()Ljava/lang/String;

    move-result-object v22

    invoke-static/range {v22 .. v22}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v16

    .line 83
    .local v16, "mm":I
    invoke-virtual/range {p0 .. p0}, Ldata/GoodsData;->Getselectid()I

    move-result v5

    .line 84
    .local v5, "checkid":I
    new-instance v15, LPlugclass/ImageLoader;

    move-object/from16 v0, p0

    iget-object v0, v0, Ldata/GoodsData;->c:Landroid/content/Context;

    move-object/from16 v22, v0

    move-object/from16 v0, v22

    invoke-direct {v15, v0}, LPlugclass/ImageLoader;-><init>(Landroid/content/Context;)V

    .line 85
    .local v15, "imageLoader":LPlugclass/ImageLoader;
    const v22, 0x7f0c0235

    move-object/from16 v0, p2

    move/from16 v1, v22

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v11

    check-cast v11, Landroid/widget/TextView;

    .line 86
    .local v11, "goodsname":Landroid/widget/TextView;
    invoke-virtual {v4}, Lbean/GoodsBean;->getname()Ljava/lang/String;

    move-result-object v22

    move-object/from16 v0, v22

    invoke-virtual {v11, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 87
    const v22, 0x7f0c0236

    move-object/from16 v0, p2

    move/from16 v1, v22

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v9

    check-cast v9, Landroid/widget/TextView;

    .line 88
    .local v9, "goodscost":Landroid/widget/TextView;
    new-instance v22, Ljava/lang/StringBuilder;

    const-string v23, "\uffe5"

    invoke-direct/range {v22 .. v23}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v4}, Lbean/GoodsBean;->getcost()F

    move-result v23

    invoke-virtual/range {v22 .. v23}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v22

    invoke-virtual/range {v22 .. v22}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v22

    move-object/from16 v0, v22

    invoke-virtual {v9, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 89
    invoke-virtual {v4}, Lbean/GoodsBean;->getimg()Ljava/lang/String;

    move-result-object v7

    .line 90
    .local v7, "checkurl":Ljava/lang/String;
    if-eqz v7, :cond_0

    const-string v22, ""

    move-object/from16 v0, v22

    invoke-virtual {v7, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v22

    if-nez v22, :cond_0

    .line 94
    const v22, 0x7f0c000a

    move-object/from16 v0, p2

    move/from16 v1, v22

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v14

    check-cast v14, Landroid/widget/ImageView;

    .line 98
    .local v14, "im5":Landroid/widget/ImageView;
    sget-object v22, Ljava/lang/System;->out:Ljava/io/PrintStream;

    new-instance v23, Ljava/lang/StringBuilder;

    const-string v24, "\u521d\u5f00\u59cb\u5316\u56fe\u7247 \u52a0\u8f7d    ==>"

    invoke-direct/range {v23 .. v24}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, v23

    move/from16 v1, p1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v23

    const-string v24, "\u56fe\u7247:"

    invoke-virtual/range {v23 .. v24}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v23

    move-object/from16 v0, v23

    invoke-virtual {v0, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v23

    invoke-virtual/range {v23 .. v23}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v23

    invoke-virtual/range {v22 .. v23}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 99
    invoke-virtual {v15, v7, v14}, LPlugclass/ImageLoader;->DisplayImage(Ljava/lang/String;Landroid/widget/ImageView;)V

    .line 108
    .end local v14    # "im5":Landroid/widget/ImageView;
    :cond_0
    invoke-virtual {v4}, Lbean/GoodsBean;->getcounts()Ljava/lang/String;

    move-result-object v22

    invoke-static/range {v22 .. v22}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v6

    .line 109
    .local v6, "checkstock":I
    const v22, 0x7f0c0082

    move-object/from16 v0, p2

    move/from16 v1, v22

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ImageView;

    .line 110
    .local v2, "addbtn":Landroid/widget/ImageView;
    const v22, 0x7f0c0080

    move-object/from16 v0, p2

    move/from16 v1, v22

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v8

    check-cast v8, Landroid/widget/ImageView;

    .line 111
    .local v8, "delbtn":Landroid/widget/ImageView;
    const v22, 0x7f0c0081

    move-object/from16 v0, p2

    move/from16 v1, v22

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v10

    check-cast v10, Landroid/widget/TextView;

    .line 112
    .local v10, "goodscoust":Landroid/widget/TextView;
    const v22, 0x7f0c0271

    move-object/from16 v0, p2

    move/from16 v1, v22

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v12

    check-cast v12, Landroid/widget/TextView;

    .line 113
    .local v12, "goodsout":Landroid/widget/TextView;
    const v22, 0x7f0c0272

    move-object/from16 v0, p2

    move/from16 v1, v22

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v19

    check-cast v19, Landroid/widget/Button;

    .line 114
    .local v19, "spec":Landroid/widget/Button;
    const v22, 0x7f0c026f

    move-object/from16 v0, p2

    move/from16 v1, v22

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v20

    check-cast v20, Landroid/widget/TextView;

    .line 116
    .local v20, "xiaoliang":Landroid/widget/TextView;
    invoke-virtual {v4}, Lbean/GoodsBean;->getsellcount()Ljava/lang/String;

    move-result-object v22

    invoke-static/range {v22 .. v22}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v21

    .line 117
    .local v21, "xiaoliangcheck":I
    if-lez v21, :cond_1

    .line 118
    new-instance v22, Ljava/lang/StringBuilder;

    const-string v23, "\u5df2\u552e"

    invoke-direct/range {v22 .. v23}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v4}, Lbean/GoodsBean;->getsellcount()Ljava/lang/String;

    move-result-object v23

    invoke-virtual/range {v22 .. v23}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v22

    invoke-virtual/range {v22 .. v22}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v22

    move-object/from16 v0, v20

    move-object/from16 v1, v22

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 122
    :cond_1
    invoke-virtual {v4}, Lbean/GoodsBean;->getCart()Ljava/lang/String;

    move-result-object v22

    move-object/from16 v0, v22

    invoke-virtual {v10, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 123
    invoke-static/range {p1 .. p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v22

    move-object/from16 v0, v22

    invoke-virtual {v2, v0}, Landroid/widget/ImageView;->setTag(Ljava/lang/Object;)V

    .line 124
    invoke-static/range {p1 .. p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v22

    move-object/from16 v0, v22

    invoke-virtual {v8, v0}, Landroid/widget/ImageView;->setTag(Ljava/lang/Object;)V

    .line 125
    invoke-virtual {v4}, Lbean/GoodsBean;->getId()Ljava/lang/String;

    move-result-object v22

    move-object/from16 v0, v19

    move-object/from16 v1, v22

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setTag(Ljava/lang/Object;)V

    .line 126
    new-instance v22, Ldata/GoodsData$1;

    move-object/from16 v0, v22

    move-object/from16 v1, p0

    invoke-direct {v0, v1}, Ldata/GoodsData$1;-><init>(Ldata/GoodsData;)V

    move-object/from16 v0, v19

    move-object/from16 v1, v22

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 137
    invoke-virtual {v4}, Lbean/GoodsBean;->getCart()Ljava/lang/String;

    move-result-object v22

    invoke-static/range {v22 .. v22}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v18

    .line 139
    .local v18, "nowsell":I
    if-lez v6, :cond_4

    .line 140
    const/16 v22, 0x0

    move/from16 v0, v22

    invoke-virtual {v8, v0}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 141
    const/16 v22, 0x0

    move/from16 v0, v22

    invoke-virtual {v10, v0}, Landroid/widget/TextView;->setVisibility(I)V

    .line 142
    const/16 v22, 0x0

    move/from16 v0, v22

    invoke-virtual {v2, v0}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 143
    const/16 v22, 0x8

    move/from16 v0, v22

    invoke-virtual {v12, v0}, Landroid/widget/TextView;->setVisibility(I)V

    .line 144
    if-gtz v18, :cond_2

    .line 147
    const/16 v22, 0x8

    move/from16 v0, v22

    invoke-virtual {v8, v0}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 148
    const/16 v22, 0x8

    move/from16 v0, v22

    invoke-virtual {v10, v0}, Landroid/widget/TextView;->setVisibility(I)V

    .line 150
    :cond_2
    invoke-virtual {v4}, Lbean/GoodsBean;->getHave_det()Ljava/lang/String;

    move-result-object v13

    .line 151
    .local v13, "have":Ljava/lang/String;
    const-string v22, "1"

    move-object/from16 v0, v22

    invoke-virtual {v13, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v22

    if-eqz v22, :cond_3

    if-lez v6, :cond_3

    .line 152
    const/16 v22, 0x0

    move-object/from16 v0, v19

    move/from16 v1, v22

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setVisibility(I)V

    .line 153
    const/16 v22, 0x8

    move/from16 v0, v22

    invoke-virtual {v2, v0}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 154
    const-string v22, "fone"

    const-string v23, "\u89c4\u683c"

    invoke-static/range {v22 .. v23}, Lmyapp/Mylog;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 157
    new-instance v17, Landroid/os/Message;

    invoke-direct/range {v17 .. v17}, Landroid/os/Message;-><init>()V

    .line 158
    .local v17, "msg":Landroid/os/Message;
    const/16 v22, 0x28

    move/from16 v0, v22

    move-object/from16 v1, v17

    iput v0, v1, Landroid/os/Message;->arg1:I

    .line 160
    sget-object v22, Lframent/FramentOrder;->h:Landroid/os/Handler;

    move-object/from16 v0, v22

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 162
    .end local v17    # "msg":Landroid/os/Message;
    :cond_3
    invoke-virtual {v4}, Lbean/GoodsBean;->getbagcost()F

    move-result v3

    .line 163
    .local v3, "bag":F
    new-instance v22, Ldata/GoodsData$2;

    move-object/from16 v0, v22

    move-object/from16 v1, p0

    invoke-direct {v0, v1, v3}, Ldata/GoodsData$2;-><init>(Ldata/GoodsData;F)V

    move-object/from16 v0, v22

    invoke-virtual {v2, v0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 181
    new-instance v22, Ldata/GoodsData$3;

    move-object/from16 v0, v22

    move-object/from16 v1, p0

    invoke-direct {v0, v1}, Ldata/GoodsData$3;-><init>(Ldata/GoodsData;)V

    move-object/from16 v0, v22

    invoke-virtual {v8, v0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 200
    .end local v3    # "bag":F
    .end local v13    # "have":Ljava/lang/String;
    :goto_0
    return-object p2

    .line 195
    :cond_4
    const/16 v22, 0x8

    move/from16 v0, v22

    invoke-virtual {v8, v0}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 196
    const/16 v22, 0x8

    move/from16 v0, v22

    invoke-virtual {v10, v0}, Landroid/widget/TextView;->setVisibility(I)V

    .line 197
    const/16 v22, 0x8

    move/from16 v0, v22

    invoke-virtual {v2, v0}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 198
    const/16 v22, 0x0

    move/from16 v0, v22

    invoke-virtual {v12, v0}, Landroid/widget/TextView;->setVisibility(I)V

    goto :goto_0
.end method

.method public setSelectedPosition(I)V
    .locals 0
    .param p1, "newposition"    # I

    .prologue
    .line 70
    iput p1, p0, Ldata/GoodsData;->selectid:I

    .line 71
    return-void
.end method
